home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1999 March
/
EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso
/
earcd
/
devel
/
vbcc-ppc
/
machines
/
amigappc
/
include
/
stdlib.h
< prev
next >
Wrap
C/C++ Source or Header
|
1999-01-01
|
2KB
|
84 lines
/* stdlib.h - vbcc PowerPC */
#ifndef __STDLIB_H
#define __STDLIB_H 1
#ifndef __SIZE_T
#define __SIZE_T 1
typedef unsigned long size_t;
#endif
#ifndef __WCHAR_T
#define __WCHAR_T 1
typedef char wchar_t;
#endif
#undef NULL
#define NULL ((void *)0)
#undef EXIT_FAILURE
#define EXIT_FAILURE 20
#undef EXIT_SUCCESS
#define EXIT_SUCCESS 0
#undef RAND_MAX
#define RAND_MAX 32768
void exit(int);
void *malloc(size_t);
void *calloc(size_t,size_t);
void *realloc(void *,size_t);
void free(void *);
int system(const char *);
int rand(void);
void srand(unsigned int);
double atof(const char *);
int atoi(const char *);
long atol(const char *);
double strtod(const char *,char **);
long strtol(const char *,char **,int);
unsigned long strtoul(const char *,char **,int);
void abort(void);
int atexit(void (*)(void));
char *getenv(const char *);
void *bsearch(const void *,const void *,size_t,size_t,int (*)(const void *,const void *));
void qsort(void *,size_t,size_t,int (*)(const void *,const void *));
/* PowerPC inline functions */
int abs(__reg("r3") int) =
"\tcmpwi\t3,0\n"
"\tbge\t$+8\n"
"\tneg\t3,3\n"
"#barrier";
long labs(__reg("r3") long) =
"\tcmpwi\t3,0\n"
"\tbge\t$+8\n"
"\tneg\t3,3\n"
"#barrier";
typedef struct {
int quot,rem;
} div_t;
typedef struct {
long quot,rem;
} ldiv_t;
div_t div(int,int);
ldiv_t ldiv(long,long);
extern size_t _nalloc;
#define atof(s) strtod((s),(char **)NULL)
#define atoi(s) (int)strtol((s),(char **)NULL,10)
#define atol(s) strtol((s),(char **)NULL,10)
struct __exitfuncs{
struct __exitfuncs *next;
void (*func)(void);
};
#endif